package qst.com.bacK.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import qst.com.bacK.pojo.entity.Choice;

/**
 * Author:   msh
 * Date:     2024/10/11 下午10:26
 * Description:
 */
public interface ChoiceMapper {
    @Insert("insert into choices(question_id,title,hint,checked) values(#{questionId}, #{title}, #{hint},#{checked})")
    int insert(Choice ch);

    @Update("update choices set title = #{title}, hint = #{hint}, checked = #{checked} where id = #{id}")
    int update(Choice ch);
}
